package ooday03.practise.practise_01;

public class Chick extends Animal {
    public Chick(){

    }
    public Chick(String name,int age,String color){
        super(name, age, color);
    }
    public void layEggs(){
        System.out.println(getColor()+"的"+getAge()+"岁的小鸡"+getName()+"在下蛋");
    }

    @Override
    public void eat() {
        System.out.println(getColor()+"的"+getAge()+"岁的小鸡"+getName()+"在吃米");
    }

    @Override
    public String toString() {
        return "Chick{" +
                "name='" + getName() + '\'' +
                ", age=" + getAge() +
                ", color='" + getColor() + '\'' +
                '}';
    }
}
